<#if result?has_content>
  <table width='100%' border='0' class='results bottomMargin' id='userList'
      cellpadding='0' cellspacing='0'>
      <col width="5%" />
      <col width="10%" />
      <col width="10%" />
      <col width="10%" />
      <col width="20%" />
      <col width="15%" />
      <col width="10%" />
      <col width="10%" />
      <thead>
        <tr>
        <th>id</th>
        <th>Date</th>
        <th>Payment</th>
        <th>Ticket Type</th>
        <th>Customer Name</th>
        <th>Customer Cuil</th>
        <th>Amount</th>
        <th>Actions</th>
        </tr>
      </thead>
      <tbody>
        <#list result as sale>
          <tr>
            <td>${sale.id}</td>
            <td>${sale.date?string("dd/MM/yyyy")}</td>
            <td><#--${sale.payment}--></td>
            <td><#--${sale.ticket}--></td>
            <#if sale.customer??>
              <td>${sale.customer.name}</td>
              <td>${sale.customer.cuil}</td>
            <#else>
              <td>-</td>
              <td>-</td>
            </#if>
            <td>$&nbsp;${sale.total?string("#.00")}</td>
            <td>
            <a href="#" onclick="javascript:var myWindow=window.open('${baseweb}/module/sale/findSale.do?saleId=${sale.id}','_blank','height=700,width=650,status=yes,toolbar=no,menubar=no,location=no,resizable=yes, scrollbars=yes'); return false;">
            View Detail</a></td>
          </tr>
        </#list>
    </tbody>
  </table>
  <#assign currentPage = command.paging.pageNumber/>
  <#assign nextPage = currentPage + 1/>
  <#assign prevPage = currentPage - 1/>
  <#assign totalPages = command.paging.totalPageNumber - 1/>
  <#if totalPages &gt; 0 && currentPage &gt; 0>
    <a id="prevPageLink" href="javascript:void(0);" onclick="javascript:reloadPage('${prevPage}')">
          &lt;&lt;
    </a>
  </#if>
  Page ${currentPage + 1} of ${totalPages+1}
  <#if totalPages &gt; 0 && currentPage &lt; totalPages>
    <a id="nextPageLink" href="javascript:void(0);" onclick="javascript:reloadPage('${nextPage}')">
          &gt;&gt;
    </a>
  </#if>
</#if>